<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>修改</title>

<script type="text/javascript" src="../js/jquery-1.8.3.min.js"></script>
<script type="text/javascript">

function updDDL() {
	var id = $("id").val();
	var type = $("#type").val();
	var key = $("#key").val();
	var value = $("#value").val();
	$.get("updDDL.action", {
		"ddl.typeId":id,
		"ddl.typeType" : type,
		"ddl.typeKey" : key,
		"ddl.typeValue" : value
	}, function(result) {
		if (result == '1') {
			alert("修改成功！");
			location.href = 'index.html';
		} else {
			alert("修改失败！");
		}
	});

}

</script>

<link href="../css/table.css" rel="stylesheet" type="text/css">
</head>
<body>

	<table width="100%" class="query_form_table">
    	<input  type="hidden" id="id" value="<s:property value="#request.ddl.typeId"/>"/>
        <input type="hidden"  id="key" name="ddl.typeKey" value="<s:property value="#request.ddl.typeKey"/>">
		<tr>
			<th class="table_rightf">类别:</th>
			<td class="tableleftf"><input type="text" id="type" name="ddl.typeType"
				value="<s:property value="#request.ddl.typeType"/>"><span class="red_star">*</span><br /></td>
		</tr>
		<tr>
			<th class="table_rightf">名称:</th>
			<td class="tableleftf"><input type="text" id="value" name="ddl.typeValue"
				value="<s:property value="#request.ddl.typeValue"/>"><span class="red_star">*</span></td>
		</tr>
		<tr>

			<td colspan="2" align="right"><input id="add"
				onclick="updDDL();" type="button" value="  修 改  " /></td>

		</tr>
	</table>

</body>
</html>